<template>
	<div id="main-box" style="font-size: 0.4rem;">
		<van-row id="set_top">
			<van-col span="2" @click="goback">
				<van-icon name="arrow-left" />
			</van-col>
			<van-col span="4" offset="8">{{userInfo.nickName}}</van-col>
		</van-row>
		<van-tabs v-model="active">
			<van-tab title="关注">
				<GuanZhu></GuanZhu>
			</van-tab>
			<van-tab title="粉丝">
				<FenSi></FenSi>
			</van-tab>
			<van-tab title="收藏">
				<ShouCang></ShouCang>
			</van-tab>
		</van-tabs>
	</div>
</template>

<script>
	import GuanZhu from './GuanZhu.vue'
	import FenSi from './FenSi.vue'
	import ShouCang from './ShouCang.vue'
	export default {
		components: {
			GuanZhu,
			FenSi,
			ShouCang
		},
		data() {
			return {
				userInfo: {},
				active: 2,
			}
		},
		created() {
			const userInfo = JSON.parse(localStorage.getItem('login'))
			this.userInfo = userInfo
		},
		methods: {
			goback() {
				this.$router.go(-1)
			},
		}
	}
</script>

<style>
	#set_top {
		font-size: 0.4rem;
		padding-top: 2vh;
		width: 96vw;
	}
	#main-box .van-tabs__line{
		bottom: 30px;
	}
</style>
